<?php

defined('PATH') or exit();

class Helper_General {

	public static function clean($_data) {
		return preg_replace('/\s+/', ' ', trim($_data));
	}

	public static function arrow_sorting_highscores($_value, $_key) {
		$paramsURI = ARCHEZ::getInstance()->getURIParams();
		if (!isset($paramsURI[1]) && $_key == 'name')
			return '▲';
		if (!isset($paramsURI[1]) || $paramsURI[1] != $_key)
			return;
		if ($_value == 'desc') {
			return '▲';
		} else if ($_value == 'asc') {
			return '▼';
		}
	}

}
?>